(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

app(x, y) → helpa(0, plus(length(x), length(y)), x, y)
plus(x, 0) → x
plus(x, s(y)) → s(plus(x, y))
length(nil) → 0
length(cons(x, y)) → s(length(y))
helpa(c, l, ys, zs) → if(ge(c, l), c, l, ys, zs)
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if(true, c, l, ys, zs) → nil
if(false, c, l, ys, zs) → helpb(c, l, greater(ys, zs), smaller(ys, zs))
greater(ys, zs) → helpc(ge(length(ys), length(zs)), ys, zs)
smaller(ys, zs) → helpc(ge(length(ys), length(zs)), zs, ys)
helpc(true, ys, zs) → ys
helpc(false, ys, zs) → zs
helpb(c, l, cons(y, ys), zs) → cons(y, helpa(s(c), l, ys, zs))

Rewrite Strategy: INNERMOST

(1) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(2) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

app(x, y) → helpa(0', plus(length(x), length(y)), x, y)
plus(x, 0') → x
plus(x, s(y)) → s(plus(x, y))
length(nil) → 0'
length(cons(x, y)) → s(length(y))
helpa(c, l, ys, zs) → if(ge(c, l), c, l, ys, zs)
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if(true, c, l, ys, zs) → nil
if(false, c, l, ys, zs) → helpb(c, l, greater(ys, zs), smaller(ys, zs))
greater(ys, zs) → helpc(ge(length(ys), length(zs)), ys, zs)
smaller(ys, zs) → helpc(ge(length(ys), length(zs)), zs, ys)
helpc(true, ys, zs) → ys
helpc(false, ys, zs) → zs
helpb(c, l, cons(y, ys), zs) → cons(y, helpa(s(c), l, ys, zs))

S is empty.
Rewrite Strategy: INNERMOST

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

Innermost TRS:
Rules:
app(x, y) → helpa(0', plus(length(x), length(y)), x, y)
plus(x, 0') → x
plus(x, s(y)) → s(plus(x, y))
length(nil) → 0'
length(cons(x, y)) → s(length(y))
helpa(c, l, ys, zs) → if(ge(c, l), c, l, ys, zs)
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if(true, c, l, ys, zs) → nil
if(false, c, l, ys, zs) → helpb(c, l, greater(ys, zs), smaller(ys, zs))
greater(ys, zs) → helpc(ge(length(ys), length(zs)), ys, zs)
smaller(ys, zs) → helpc(ge(length(ys), length(zs)), zs, ys)
helpc(true, ys, zs) → ys
helpc(false, ys, zs) → zs
helpb(c, l, cons(y, ys), zs) → cons(y, helpa(s(c), l, ys, zs))

Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: a → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_a3_0 :: a
hole_true:false4_0 :: true:false
gen_nil:cons5_0 :: Nat → nil:cons
gen_0':s6_0 :: Nat → 0':s

(5) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
helpa, plus, length, ge, helpb

They will be analysed ascendingly in the following order:
ge < helpa
helpa = helpb

(6) Obligation:

Innermost TRS:
Rules:
app(x, y) → helpa(0', plus(length(x), length(y)), x, y)
plus(x, 0') → x
plus(x, s(y)) → s(plus(x, y))
length(nil) → 0'
length(cons(x, y)) → s(length(y))
helpa(c, l, ys, zs) → if(ge(c, l), c, l, ys, zs)
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if(true, c, l, ys, zs) → nil
if(false, c, l, ys, zs) → helpb(c, l, greater(ys, zs), smaller(ys, zs))
greater(ys, zs) → helpc(ge(length(ys), length(zs)), ys, zs)
smaller(ys, zs) → helpc(ge(length(ys), length(zs)), zs, ys)
helpc(true, ys, zs) → ys
helpc(false, ys, zs) → zs
helpb(c, l, cons(y, ys), zs) → cons(y, helpa(s(c), l, ys, zs))

Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: a → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_a3_0 :: a
hole_true:false4_0 :: true:false
gen_nil:cons5_0 :: Nat → nil:cons
gen_0':s6_0 :: Nat → 0':s

Generator Equations:
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(hole_a3_0, gen_nil:cons5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))

The following defined symbols remain to be analysed:
plus, helpa, length, ge, helpb

They will be analysed ascendingly in the following order:
ge < helpa
helpa = helpb

(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)

Induction Base:
plus(gen_0':s6_0(a), gen_0':s6_0(0)) →RΩ(1)
gen_0':s6_0(a)

Induction Step:
plus(gen_0':s6_0(a), gen_0':s6_0(+(n8_0, 1))) →RΩ(1)
s(plus(gen_0':s6_0(a), gen_0':s6_0(n8_0))) →IH
s(gen_0':s6_0(+(a, c9_0)))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(8) Complex Obligation (BEST)

(9) Obligation:

Innermost TRS:
Rules:
app(x, y) → helpa(0', plus(length(x), length(y)), x, y)
plus(x, 0') → x
plus(x, s(y)) → s(plus(x, y))
length(nil) → 0'
length(cons(x, y)) → s(length(y))
helpa(c, l, ys, zs) → if(ge(c, l), c, l, ys, zs)
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if(true, c, l, ys, zs) → nil
if(false, c, l, ys, zs) → helpb(c, l, greater(ys, zs), smaller(ys, zs))
greater(ys, zs) → helpc(ge(length(ys), length(zs)), ys, zs)
smaller(ys, zs) → helpc(ge(length(ys), length(zs)), zs, ys)
helpc(true, ys, zs) → ys
helpc(false, ys, zs) → zs
helpb(c, l, cons(y, ys), zs) → cons(y, helpa(s(c), l, ys, zs))

Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: a → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_a3_0 :: a
hole_true:false4_0 :: true:false
gen_nil:cons5_0 :: Nat → nil:cons
gen_0':s6_0 :: Nat → 0':s

Lemmas:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)

Generator Equations:
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(hole_a3_0, gen_nil:cons5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))

The following defined symbols remain to be analysed:
length, helpa, ge, helpb

They will be analysed ascendingly in the following order:
ge < helpa
helpa = helpb

(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
length(gen_nil:cons5_0(n865_0)) → gen_0':s6_0(n865_0), rt ∈ Ω(1 + n8650)

Induction Base:
length(gen_nil:cons5_0(0)) →RΩ(1)
0'

Induction Step:
length(gen_nil:cons5_0(+(n865_0, 1))) →RΩ(1)
s(length(gen_nil:cons5_0(n865_0))) →IH
s(gen_0':s6_0(c866_0))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(11) Complex Obligation (BEST)

(12) Obligation:

Innermost TRS:
Rules:
app(x, y) → helpa(0', plus(length(x), length(y)), x, y)
plus(x, 0') → x
plus(x, s(y)) → s(plus(x, y))
length(nil) → 0'
length(cons(x, y)) → s(length(y))
helpa(c, l, ys, zs) → if(ge(c, l), c, l, ys, zs)
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if(true, c, l, ys, zs) → nil
if(false, c, l, ys, zs) → helpb(c, l, greater(ys, zs), smaller(ys, zs))
greater(ys, zs) → helpc(ge(length(ys), length(zs)), ys, zs)
smaller(ys, zs) → helpc(ge(length(ys), length(zs)), zs, ys)
helpc(true, ys, zs) → ys
helpc(false, ys, zs) → zs
helpb(c, l, cons(y, ys), zs) → cons(y, helpa(s(c), l, ys, zs))

Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: a → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_a3_0 :: a
hole_true:false4_0 :: true:false
gen_nil:cons5_0 :: Nat → nil:cons
gen_0':s6_0 :: Nat → 0':s

Lemmas:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)
length(gen_nil:cons5_0(n865_0)) → gen_0':s6_0(n865_0), rt ∈ Ω(1 + n8650)

Generator Equations:
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(hole_a3_0, gen_nil:cons5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))

The following defined symbols remain to be analysed:
ge, helpa, helpb

They will be analysed ascendingly in the following order:
ge < helpa
helpa = helpb

(13) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
ge(gen_0':s6_0(n1170_0), gen_0':s6_0(n1170_0)) → true, rt ∈ Ω(1 + n11700)

Induction Base:
ge(gen_0':s6_0(0), gen_0':s6_0(0)) →RΩ(1)
true

Induction Step:
ge(gen_0':s6_0(+(n1170_0, 1)), gen_0':s6_0(+(n1170_0, 1))) →RΩ(1)
ge(gen_0':s6_0(n1170_0), gen_0':s6_0(n1170_0)) →IH
true

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(14) Complex Obligation (BEST)

(15) Obligation:

Innermost TRS:
Rules:
app(x, y) → helpa(0', plus(length(x), length(y)), x, y)
plus(x, 0') → x
plus(x, s(y)) → s(plus(x, y))
length(nil) → 0'
length(cons(x, y)) → s(length(y))
helpa(c, l, ys, zs) → if(ge(c, l), c, l, ys, zs)
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if(true, c, l, ys, zs) → nil
if(false, c, l, ys, zs) → helpb(c, l, greater(ys, zs), smaller(ys, zs))
greater(ys, zs) → helpc(ge(length(ys), length(zs)), ys, zs)
smaller(ys, zs) → helpc(ge(length(ys), length(zs)), zs, ys)
helpc(true, ys, zs) → ys
helpc(false, ys, zs) → zs
helpb(c, l, cons(y, ys), zs) → cons(y, helpa(s(c), l, ys, zs))

Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: a → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_a3_0 :: a
hole_true:false4_0 :: true:false
gen_nil:cons5_0 :: Nat → nil:cons
gen_0':s6_0 :: Nat → 0':s

Lemmas:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)
length(gen_nil:cons5_0(n865_0)) → gen_0':s6_0(n865_0), rt ∈ Ω(1 + n8650)
ge(gen_0':s6_0(n1170_0), gen_0':s6_0(n1170_0)) → true, rt ∈ Ω(1 + n11700)

Generator Equations:
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(hole_a3_0, gen_nil:cons5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))

The following defined symbols remain to be analysed:
helpb, helpa

They will be analysed ascendingly in the following order:
helpa = helpb

(16) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol helpb.

(17) Obligation:

Innermost TRS:
Rules:
app(x, y) → helpa(0', plus(length(x), length(y)), x, y)
plus(x, 0') → x
plus(x, s(y)) → s(plus(x, y))
length(nil) → 0'
length(cons(x, y)) → s(length(y))
helpa(c, l, ys, zs) → if(ge(c, l), c, l, ys, zs)
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if(true, c, l, ys, zs) → nil
if(false, c, l, ys, zs) → helpb(c, l, greater(ys, zs), smaller(ys, zs))
greater(ys, zs) → helpc(ge(length(ys), length(zs)), ys, zs)
smaller(ys, zs) → helpc(ge(length(ys), length(zs)), zs, ys)
helpc(true, ys, zs) → ys
helpc(false, ys, zs) → zs
helpb(c, l, cons(y, ys), zs) → cons(y, helpa(s(c), l, ys, zs))

Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: a → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_a3_0 :: a
hole_true:false4_0 :: true:false
gen_nil:cons5_0 :: Nat → nil:cons
gen_0':s6_0 :: Nat → 0':s

Lemmas:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)
length(gen_nil:cons5_0(n865_0)) → gen_0':s6_0(n865_0), rt ∈ Ω(1 + n8650)
ge(gen_0':s6_0(n1170_0), gen_0':s6_0(n1170_0)) → true, rt ∈ Ω(1 + n11700)

Generator Equations:
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(hole_a3_0, gen_nil:cons5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))

The following defined symbols remain to be analysed:
helpa

They will be analysed ascendingly in the following order:
helpa = helpb

(18) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol helpa.

(19) Obligation:

Innermost TRS:
Rules:
app(x, y) → helpa(0', plus(length(x), length(y)), x, y)
plus(x, 0') → x
plus(x, s(y)) → s(plus(x, y))
length(nil) → 0'
length(cons(x, y)) → s(length(y))
helpa(c, l, ys, zs) → if(ge(c, l), c, l, ys, zs)
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if(true, c, l, ys, zs) → nil
if(false, c, l, ys, zs) → helpb(c, l, greater(ys, zs), smaller(ys, zs))
greater(ys, zs) → helpc(ge(length(ys), length(zs)), ys, zs)
smaller(ys, zs) → helpc(ge(length(ys), length(zs)), zs, ys)
helpc(true, ys, zs) → ys
helpc(false, ys, zs) → zs
helpb(c, l, cons(y, ys), zs) → cons(y, helpa(s(c), l, ys, zs))

Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: a → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_a3_0 :: a
hole_true:false4_0 :: true:false
gen_nil:cons5_0 :: Nat → nil:cons
gen_0':s6_0 :: Nat → 0':s

Lemmas:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)
length(gen_nil:cons5_0(n865_0)) → gen_0':s6_0(n865_0), rt ∈ Ω(1 + n8650)
ge(gen_0':s6_0(n1170_0), gen_0':s6_0(n1170_0)) → true, rt ∈ Ω(1 + n11700)

Generator Equations:
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(hole_a3_0, gen_nil:cons5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))

No more defined symbols left to analyse.

(20) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)

(21) BOUNDS(n^1, INF)

(22) Obligation:

Innermost TRS:
Rules:
app(x, y) → helpa(0', plus(length(x), length(y)), x, y)
plus(x, 0') → x
plus(x, s(y)) → s(plus(x, y))
length(nil) → 0'
length(cons(x, y)) → s(length(y))
helpa(c, l, ys, zs) → if(ge(c, l), c, l, ys, zs)
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if(true, c, l, ys, zs) → nil
if(false, c, l, ys, zs) → helpb(c, l, greater(ys, zs), smaller(ys, zs))
greater(ys, zs) → helpc(ge(length(ys), length(zs)), ys, zs)
smaller(ys, zs) → helpc(ge(length(ys), length(zs)), zs, ys)
helpc(true, ys, zs) → ys
helpc(false, ys, zs) → zs
helpb(c, l, cons(y, ys), zs) → cons(y, helpa(s(c), l, ys, zs))

Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: a → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_a3_0 :: a
hole_true:false4_0 :: true:false
gen_nil:cons5_0 :: Nat → nil:cons
gen_0':s6_0 :: Nat → 0':s

Lemmas:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)
length(gen_nil:cons5_0(n865_0)) → gen_0':s6_0(n865_0), rt ∈ Ω(1 + n8650)
ge(gen_0':s6_0(n1170_0), gen_0':s6_0(n1170_0)) → true, rt ∈ Ω(1 + n11700)

Generator Equations:
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(hole_a3_0, gen_nil:cons5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))

No more defined symbols left to analyse.

(23) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)

(24) BOUNDS(n^1, INF)

(25) Obligation:

Innermost TRS:
Rules:
app(x, y) → helpa(0', plus(length(x), length(y)), x, y)
plus(x, 0') → x
plus(x, s(y)) → s(plus(x, y))
length(nil) → 0'
length(cons(x, y)) → s(length(y))
helpa(c, l, ys, zs) → if(ge(c, l), c, l, ys, zs)
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if(true, c, l, ys, zs) → nil
if(false, c, l, ys, zs) → helpb(c, l, greater(ys, zs), smaller(ys, zs))
greater(ys, zs) → helpc(ge(length(ys), length(zs)), ys, zs)
smaller(ys, zs) → helpc(ge(length(ys), length(zs)), zs, ys)
helpc(true, ys, zs) → ys
helpc(false, ys, zs) → zs
helpb(c, l, cons(y, ys), zs) → cons(y, helpa(s(c), l, ys, zs))

Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: a → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_a3_0 :: a
hole_true:false4_0 :: true:false
gen_nil:cons5_0 :: Nat → nil:cons
gen_0':s6_0 :: Nat → 0':s

Lemmas:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)
length(gen_nil:cons5_0(n865_0)) → gen_0':s6_0(n865_0), rt ∈ Ω(1 + n8650)

Generator Equations:
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(hole_a3_0, gen_nil:cons5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))

No more defined symbols left to analyse.

(26) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)

(27) BOUNDS(n^1, INF)

(28) Obligation:

Innermost TRS:
Rules:
app(x, y) → helpa(0', plus(length(x), length(y)), x, y)
plus(x, 0') → x
plus(x, s(y)) → s(plus(x, y))
length(nil) → 0'
length(cons(x, y)) → s(length(y))
helpa(c, l, ys, zs) → if(ge(c, l), c, l, ys, zs)
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if(true, c, l, ys, zs) → nil
if(false, c, l, ys, zs) → helpb(c, l, greater(ys, zs), smaller(ys, zs))
greater(ys, zs) → helpc(ge(length(ys), length(zs)), ys, zs)
smaller(ys, zs) → helpc(ge(length(ys), length(zs)), zs, ys)
helpc(true, ys, zs) → ys
helpc(false, ys, zs) → zs
helpb(c, l, cons(y, ys), zs) → cons(y, helpa(s(c), l, ys, zs))

Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: a → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_a3_0 :: a
hole_true:false4_0 :: true:false
gen_nil:cons5_0 :: Nat → nil:cons
gen_0':s6_0 :: Nat → 0':s

Lemmas:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)

Generator Equations:
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(hole_a3_0, gen_nil:cons5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))

No more defined symbols left to analyse.

(29) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)

(30) BOUNDS(n^1, INF)